/*-------------------------------------------------------------------------

***************** Modification History ***********************************
   @doc
   @module logo.h - Header file for Logo Display functions |
   @end

$Log: /SoftPay/SPK2SIM/Source/Include/logo.h $
**************************************************************************

   Copyright (C) 1999 by VeriFone, Inc.

   All rights reserved.  No part of this software may be reproduced,
   transmitted, transcribed, stored in a retrieval system, or translated
   into any language or computer language, in any form or by any means,
   electronic, mechanical, magnetic, optical, chemical, manual or otherwise,
   without the prior written permission of VeriFone, Inc.

---------------------------------------------------------------------------*/

#ifndef VSLOGO_H
#define VSLOGO_H

#include <transact.h>

extern VS_BOOL fDisplayLogoNow;

// Rannie_B1 04262004: Fixed the bug wherein the down arrow icon is not shown
// if the language in use is not English
//#define uiDOWN_ARROW        (char)0
#define uiDOWN_ARROW        (char)23
// End Rannie_B1 04262004

#define uiUP_ARROW          (char)1

#define DEMO_CHAR1			(char)2
#define DEMO_CHAR2			(char)3

#define ANTENNA_CHAR1		(char)4
#define BATTERY_CHAR1		(char)9

void vdSetCurrentFont(const char *pszFontName);
void vdGetCurrentFont(char *pszFontName);
void vdSetEntryFont(VS_BOOL fForceFont);
void vdCalculateCoord ( int inType, int * inCol, int * inRow );
void vdDisplayAt_ASC8X21 (int x, int y, char *m, int o);
void vdClear_8X21_Window (int inLeft, int inTop, int inRight, int inBottom);
void vdResetEntryFont(VS_BOOL fForceFont);
void vdSetIdleFont(VS_BOOL fForceFont);
void vdResetIdleFont(VS_BOOL fForceFont);
void vdSetActionFont(void);
void vdSetMenuFont(void);
void vdSetGridParams(short shGridType);
void vdPutIdleLogo(void);
void vdPutCopyRightLogo(const char *pszLogoFontFileName);
int  idle_logo_default(void);
int  inDisplayAtInit(TRANSACTION_OBJECT *pobTran);
int  inDisplayAtIdle(TRANSACTION_OBJECT *pobTran);
void vdDisplayDEMO(void);
void vdDisplayEnvelop(void);
void vdDisplayWireless(void);
short shComputeGraphicIndex (int inPercent, int inLevels);
void vdGetBatteryStatus (void);
void vdDisplayDockStatus (void);
void vdDisplayBattery(void);
void vdTerminalSleep (void);
void vdCheckIdleTimeOut (void);
void vdToggleArrow(void);
void vdDisplayFontChar(const char *pszFontName, char chCharNo);
void vdMLDisplayFontChar(const char* pszFontName,char chCharNo, int x, int y);
void vdWriteSpace (void);
void vdDisplayCopyright(void);
void vdDisplayGraphic (const char *pszFilename, VS_BOOL fClrscr, int i_col, int i_row);
int i_display_graphic(const char *bp_graphic_name,int i_col,int i_row);
short shGetIdleLogoFileType (char *pszIdleLogoName);

int LOGO_CODE_CHECK(char * a,char *b, short  *  c,char * d,unsigned char * e);

#define IDLE_LOGO_FONT		"F:SPILOGO.VFT"
#define COPYRIGHT_FONT		"F:SPCLOGO.VFT"
#define UTILITY_FONT        "F:SPUTIL.VFT"
#define ASC4X8_VFT			"F:ASC4X8.VFT"
#define ASC4X16_VFT			"F:ASC4X16.VFT"
#define ASC8X21_VFT			"F:ASC8X21.VFT"
#define ENTRY_FONT        	ASC8X21_VFT
#define IDLE_FONT			ASC4X16_VFT

#define		GRID_4x8_TO_8x21		0

// define for i_display function
//#define RIGHT_JUSTIFY  99
//#define CENTER_JUSTIFY 0
//#define LEFT_JUSTIFY   1
#define WAIT_KEY       1
//#define NO_CLEAR       0
#define CLEAR_SCREEN   1
#define CLEAR_LINE     2
#define CLEAR_AREA     3
#define BEEP           1
#define BERROR         6


typedef struct
{
  BYTE b_len;
  BYTE b_col;
  BYTE b_row;
  BYTE bp_line[150];
} S_GRA;

extern VS_BOOL fDisplayIdleIcons;

#define VFT_IDLE_LOGO 		101
#define GRA_IDLE_LOGO 		102

#endif

